package cn.jn.lhm.teacher.service;

import cn.jn.lhm.teacher.entity.EduTeacher;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
 * @author LHM
 * @Tips 热爱每一天，奋斗每一天
 * @date 2020/5/27 - 21:42
 */

public interface EduTeacherService {

    List<EduTeacher> listByWrap(QueryWrapper<EduTeacher> wrapper);

    boolean deleteById(Long id);

   IPage<EduTeacher> listByPage(Page<EduTeacher> page, QueryWrapper<EduTeacher> wrapper);

    boolean save(EduTeacher eduTeacher);

    boolean updateById(EduTeacher eduTeacher);

    EduTeacher getById(Long id);

    /**
     * 分页查询数据，返回map集合封装数据
     * @param page 分页对象
     * @return Map集合
     */
    Map<String, Object> listByPageToMap(Page<EduTeacher> page);

    /**
     * 根据ID查询对应的讲师信息
     * @param id 讲师ID
     * @return EduTeacher
     */
    EduTeacher getTeacherInfo(String id);
}

